package com.jcsz.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jcsz.common.utils.PageUtils;
import com.jcsz.gulimall.product.entity.AttrEntity;
import com.jcsz.gulimall.product.entity.ProductAttrValueEntity;
import com.jcsz.gulimall.product.vo.AttrGroupWithAttrsVo;
import com.jcsz.gulimall.product.vo.AttrRespVo;
import com.jcsz.gulimall.product.vo.AttrVo;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author 一把Po吉他
 * @email volibear@gulimall.com
 * @date 2022-10-16 08:40:06
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPageWrapper(Map<String, Object> params, String attrType, Long catelogId);

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    AttrRespVo getAttrById(Long attrId);

    void updateAttrById(AttrVo attr);

    List<AttrEntity> getRelationAttr(Long attrGroupId);

    List<ProductAttrValueEntity> getBaseAttrBySpuId(Long spuId);

    void updateBaseAttrBySpuId(Long spuId, List<ProductAttrValueEntity> productAttrValueEntityList);

    List<Long> selectSearchAttrIds(List<Long> ids);
}

